package org.vison.wonfu.framework;

import lombok.Data;

@Data
public class BaseRes <T>{
    private int ret;
    private String msg;
    private T data;

    public static <T> BaseRes<T> success(T data){
        BaseRes<T> res = new BaseRes();
        res.ret = 0;
        res.msg = "success";
        res.data = data;
        return res;
    }

    public boolean isSuccess(){
        return ret == 0;
    }


}
